export function getRedirectPath({ type, avatar }){
    if(!type) return ''
    let prefix = avatar ? '/home' : '/information'
    return `${prefix}/${type}`
}

export function analysisUrlSearch(search){
    let obj = {}
    for(let item of search.substr(1).split('&')){
        let arr = item.split('=')
        obj[arr[0]] = arr[1]
    }
    return obj
}